home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c++ / 401 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  2.0 KB

  1. Path: chronicle.mti.sgi.com!austern
  2. From: tony@online.tmx.com.au (Tony Cook)
  3. Newsgroups: comp.std.c++
  4. Subject: Re: proposal: renew & relocator member fn
  5. Date: 20 Feb 1996 15:22:24 PST
  6. Organization: Home
  7. Approved: austern@isolde.mti.sgi.com
  8. Message-ID: <199602202319.KAA03283@online.tmx.com.au>
  9. References: <GNB.96Feb7140952@dame.bby.com.au> <4ffq10$7vb@bmtlh10.bnr.ca> <9602191213.AA01558@s7604030.ferndown.ate.slb.com>
  10. NNTP-Posting-Host: isolde.mti.sgi.com
  11. X-Original-Date: Wed, 21 Feb 1996 10:19:41 +1100
  12. X-Newsreader: TIN [version 1.2 PL2]
  13. X-Auth: PGPMoose V1.1 PGP comp.std.c++
  14.     iQBVAwUBMSpXw0y4NqrwXLNJAQETWgH6An/o+de2Cx8OvdJI28Qd29z7Vguvb2OL
  15.     4oKbhi/9bBF6KDNMxKcIzqul1kBwv7yQf0dvnp3OmkMvGOMCNuJKHg==
  16.     =cKj3
  17. Originator: austern@isolde.mti.sgi.com
  18.  
  19. devitto@ferndown.ate.slb.com wrote:
  20. : On 10 Feb 96 08:35:39 GMT, john (j.d.) hickin (hickin@bnr.ca) wrote:
  21. : : |> Go ahead, shoot me down!
  22.  
  23. : : POW!
  24.  
  25. : I 'wrote' with Bjarne about a general 'renew' a couple of years ago.  u
  26. : Basically the problem is that a general "resize this C array" routine is 
  27. : difficult without virtual contructors, and virtual copy constructors 
  28. : - otherwise the routine would need static type binding (templates).
  29.  
  30. Urr...why?
  31.  
  32. Doesn't using delete [] on a pointer with the wrong static type
  33. produce undefined behaviour anyway? ([expr.delete] stanza 3)
  34.  
  35. Actually, if we had a memory allocator that split what realloc does
  36. into 'attempt to expand this block' and 'allocate a new block' then
  37. we can write renew ourselves.  Unfortunately, at least some,
  38. operating systems, won't support this.
  39. -- 
  40.         Tony Cook - tony@online.tmx.com.au
  41.                     100237.3425@compuserve.com
  42. ---
  43. [ To submit articles: Try just posting with your newsreader.  If that fails,
  44.                       use mailto:std-c++@ncar.ucar.edu
  45.   FAQ:    http://reality.sgi.com/employees/austern_mti/std-c++/faq.html
  46.   Policy: http://reality.sgi.com/employees/austern_mti/std-c++/policy.html
  47.   Comments? mailto:std-c++-request@ncar.ucar.edu 
  48. ]
  49.